#include "thread/thread.h"
#include <pthread.h>

void* HelperRun(void* p) {
  ((Thread*)p)->Run();
  return NULL;
}

Thread::Thread() {
}

Thread::Thread(const string& name)
    : name_(name) {
}

Thread::~Thread() {
}

void Thread::Start() {
  pthread_create(&thread_, NULL, &HelperRun, this);
}

void Thread::Join() {
  pthread_join(thread_, NULL);
}
